import React, {Fragment} from 'react';

/**
 * 定义竖实线
 */
interface LineProps {
    border: number;
    height: number;

}

export default React.memo((props: LineProps) => {
    const {border, height} = props;

    const left = Math.floor(border / 2) // 向下取整
    const right = Math.round(border / 2)

    return (
        <Fragment>
            <div style={{
                display: "inline-block", // 怪异盒模型,宽度
                margin: 0,
                height: `${height}px`,
                borderLeft: `solid #cacaca ${left}px`,
                borderRight: `solid #cacaca ${right}px`,
                width: `${border}px`

            }}
            ></div>
        </Fragment>
    )
})
